package com.ml.ws.security;

import java.util.ArrayList;

import org.springframework.security.core.GrantedAuthority;

public class UserLoginDao {

	public static UserLogin findByEmail(String name) {
		UserLogin ul = new UserLogin(name.substring(0, name.indexOf("@")), "ml", true, true, true, true,
				new ArrayList<GrantedAuthority>());

		ul.setEmail(name);
		ul.setMobile("mobile");
		ul.setUserType(1);
		
		return ul;
	}
	
	public static UserLogin findByNick(String name) {
		UserLogin ul = new UserLogin(name, "ml", true, true, true, true,
				new ArrayList<GrantedAuthority>());

		ul.setEmail(name+"@test.com");
		ul.setMobile("mobile");
		ul.setUserType(1);
		
		return ul;
	}

}
